<%@ Page Title="" Language="C#" MasterPageFile="~/Master/List.Master" AutoEventWireup="true"
    CodeBehind="Rosters.aspx.cs" Inherits="MTC.Web.Forms.Rosters" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="../Controls/Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<%@ Register Src="../Controls/NavMenu.ascx" TagName="NavMenu" TagPrefix="uc3" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.1.Export, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CPHeader" runat="server">
    <table width="100%">
        <tr align="right">
            <td align="right">
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/excel.jpg" OnClick="btnExcel_Click" />&nbsp;<asp:ImageButton
                    ID="ImageButton2" runat="server" ImageUrl="~/Images/pdf.jpg" OnClick="btnPdf_Click" />&nbsp;<asp:ImageButton
                        ID="ImageButton3" runat="server" ImageUrl="~/Images/rtf.jpg" OnClick="btnRtf_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPNav" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPMain" runat="server">
    <table width="100%">
        <tr>
            <td style="width: 598px">
                <table style="width: 99%">
                    <tr>
                        <td style="width: 156px">
                            <dxe:ASPxLabel ID="LblDateOfSchedule" runat="server" Text="Schedule Date">
                            </dxe:ASPxLabel>
                        </td>
                        <td>
                            <dxe:ASPxDateEdit ID="TxtDateofSchedule" runat="server">
                            </dxe:ASPxDateEdit>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 156px">
                            <dxe:ASPxLabel ID="LblShift" runat="server" Text="Shift">
                            </dxe:ASPxLabel>
                        </td>
                        <td>
                            <asp:DropDownList ID="CboShift" runat="server" DataTextField="ShiftDescription" DataValueField="ShiftId">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 156px">
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
            </td>
            <td valign="top">
                <asp:Button ID="BtnSelect" runat="server" Text="Load Roster" Width="100%" OnClick="BtnSelect_Click" />
                <br />
                <asp:Button ID="BtnClear" runat="server" Text="Delete Roster" Width="100%" OnClick="BtnClear_Click" />
                <br />
            </td>
        </tr>
    </table>
    <dxwgv:ASPxGridView ID="grdRosters" runat="server" Width="100%" AutoGenerateColumns="False"
        DataSourceID="ObjectDataSource1" KeyFieldName="ScheduleDriverTaxiId" CssFilePath="~/App_Themes/Soft Orange/{0}/styles.css"
        CssPostfix="Soft_Orange">
        <Styles CssFilePath="~/App_Themes/Soft Orange/{0}/styles.css" CssPostfix="Soft_Orange"
            GroupButtonWidth="28">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="10px">
            </LoadingPanel>
        </Styles>
        <SettingsLoadingPanel Text="" />
        <Images ImageFolder="~/App_Themes/Soft Orange/{0}/">
            <CollapsedButton Height="14px" Url="~/App_Themes/Soft Orange/GridView/gvCollapsedButton.png"
                Width="13px" />
            <ExpandedButton Height="13px" Url="~/App_Themes/Soft Orange/GridView/gvExpandedButton.png"
                Width="13px" />
            <DetailCollapsedButton Height="14px" Url="~/App_Themes/Soft Orange/GridView/gvCollapsedButton.png"
                Width="13px" />
            <DetailExpandedButton Height="13px" Url="~/App_Themes/Soft Orange/GridView/gvExpandedButton.png"
                Width="13px" />
            <HeaderFilter Height="19px" Url="~/App_Themes/Soft Orange/GridView/gvHeaderFilter.png"
                Width="19px" />
            <HeaderActiveFilter Height="19px" Url="~/App_Themes/Soft Orange/GridView/gvHeaderFilterActive.png"
                Width="19px" />
            <HeaderSortDown Height="3px" Url="~/App_Themes/Soft Orange/GridView/gvHeaderSortDown.png"
                Width="6px" />
            <HeaderSortUp Height="3px" Url="~/App_Themes/Soft Orange/GridView/gvHeaderSortUp.png"
                Width="6px" />
            <FilterRowButton Height="13px" Width="13px" />
            <CustomizationWindowClose Height="18px" Width="18px" />
            <PopupEditFormWindowClose Height="18px" Width="18px" />
            <WindowResizer Height="12px" Url="~/App_Themes/Soft Orange/GridView/WindowResizer.png"
                Width="12px" />
            <FilterBuilderClose Height="18px" Width="18px" />
        </Images>
        <SettingsPager PageSize="50">
            <AllButton>
                <Image Height="19px" Width="28px" />
            </AllButton>
            <FirstPageButton>
                <Image Height="19px" Width="23px" />
            </FirstPageButton>
            <LastPageButton>
                <Image Height="19px" Width="23px" />
            </LastPageButton>
            <NextPageButton>
                <Image Height="19px" Width="19px" />
            </NextPageButton>
            <PrevPageButton>
                <Image Height="19px" Width="19px" />
            </PrevPageButton>
        </SettingsPager>
        <GroupSummary>
            <dxwgv:ASPxSummaryItem FieldName="ScheduleId" SummaryType="Count" />
        </GroupSummary>
        <Columns>
            <dxwgv:GridViewDataTextColumn FieldName="ScheduleId" VisibleIndex="1" Visible="False">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="ShiftId" VisibleIndex="1" Visible="False">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataDateColumn FieldName="ScheduleDate" VisibleIndex="1" Visible="False">
            </dxwgv:GridViewDataDateColumn>
            <dxwgv:GridViewDataComboBoxColumn Caption="Name" FieldName="DriverId" VisibleIndex="2">
                <PropertiesComboBox ValueType="System.String" DataSourceID="cboDriverDataSource"
                    TextField="Name" ValueField="DriverId">
                </PropertiesComboBox>
            </dxwgv:GridViewDataComboBoxColumn>
            <dxwgv:GridViewDataTextColumn FieldName="TaxiId" VisibleIndex="1" Visible="False">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="PlateNumber" VisibleIndex="1" ReadOnly="true">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="ShiftDescription" VisibleIndex="3" ReadOnly="true">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="FirstName" VisibleIndex="3" Visible="False">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="LastName" VisibleIndex="3" Visible="False">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="ScheduleDriverTaxiId" VisibleIndex="5" Visible="False">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="Name" VisibleIndex="3" Visible="False">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewCommandColumn VisibleIndex="3">
                <EditButton Visible="True">
                </EditButton>
                <ClearFilterButton Visible="True">
                </ClearFilterButton>
            </dxwgv:GridViewCommandColumn>
        </Columns>
        <Paddings Padding="1px" />
        <Settings ShowFilterRow="True" ShowGroupPanel="True" />
        <ImagesEditors>
            <CalendarPrevYear Height="19px" Url="~/App_Themes/Soft Orange/Editors/edtCalendarPrevYear.png"
                Width="23px" />
            <CalendarPrevMonth Height="19px" Url="~/App_Themes/Soft Orange/Editors/edtCalendarPrevMonth.png"
                Width="19px" />
            <CalendarNextMonth Height="19px" Url="~/App_Themes/Soft Orange/Editors/edtCalendarNextMonth.png"
                Width="19px" />
            <CalendarNextYear Height="19px" Url="~/App_Themes/Soft Orange/Editors/edtCalendarNextYear.png"
                Width="23px" />
        </ImagesEditors>
    </dxwgv:ASPxGridView>
    <dxwgv:ASPxGridViewExporter ID="GrdExport" runat="server" GridViewID="grdRosters">
    </dxwgv:ASPxGridViewExporter>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetASchedule"
        TypeName="MTC.Web.Business.Schedule" DeleteMethod="DeleteASchedule" UpdateMethod="UpdateASchedule">
        <DeleteParameters>
            <asp:Parameter Name="scheduleDate" Type="DateTime" />
            <asp:Parameter Name="shiftId" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="ScheduleDriverTaxiId" Type="Int32" />
            <asp:Parameter Name="DriverId" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="TxtDateofSchedule" Name="scheduleDate" PropertyName="Text"
                Type="DateTime" />
            <asp:ControlParameter ControlID="CboShift" Name="shiftId" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="cboDriverDataSource" runat="server" SelectMethod="GetDrivers"
        TypeName="MTC.Web.Business.DropDowns"></asp:ObjectDataSource>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="CPSideBar" runat="server">
    <uc3:NavMenu ID="NavMenu1" runat="server" />
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="CPFooter" runat="server">
</asp:Content>
